<?php

require_once 'include/OutputStream.php';

class XMLOutputStream Extends OutputStream
{

   function __construct()
   {
      parent::__construct();
      header("Content-type: text/xml");
      $this->addLine("<?xml version='1.0' encoding='ISO-8859-1'?>");
   }

   public function beginTag($field)
   {
      $this->addLine("<$field>");       
   }

   public function endTag($field)
   {
      $this->addLine("</$field>");       
   }

   public function addValue($field, $data)
   {
      $this->addLine("<$field>$data</$field>");
   }

}

?>